package net.jlibrary.invoice.action.vo;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

import net.jlibrary.common.CoreConstants;
import net.jlibrary.common.core.annotation.VoForPo;
import net.jlibrary.common.core.entity.BaseVo;
import net.jlibrary.invoice.domain.Goods;
import net.jlibrary.invoice.domain.SlKind;

@VoForPo(Goods.class)
public class GoodsActionVo extends BaseVo {
	private static final long serialVersionUID = -127633223415668724L;
	private Long id;
	private String nsrsbh;// 纳税人编号
	private String spbm;// 商品编码
	private String spmc;// 商品名称
	private String spsm;// 商品税目
	private String yhzcbs;// 0未使用;1使用
	private String lslbs;// 空 代表无 1 出口免税和其他免税优惠政策 2 不征增值税 3 普通零税率
	private String zzstsgl;// 如果yhzcbs为1时，此项必填
	private String dw;// 单位
	private Double dj;// 单价
//	private Double sl;// 税率
	private slKindVo slKind;// 税率类型
	private String ggxh;// 规格型号
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date createdate;
	@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
	@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
	private Date lastdate;

	public GoodsActionVo() {
		slKind = new slKindVo();
	}

	@VoForPo(SlKind.class)
	public class slKindVo extends BaseVo {
		private static final long serialVersionUID = -1616200913601477125L;
		private Long id;
		private String name;
		private String code;
		private String description;
		private int taxis;
		private boolean valid;
		private boolean allowQueryInvalid;
		private boolean compellingDelete;
		private String parentIsNull;
		private String validString;
		@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
		@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
		private Date createdate;
		@DateTimeFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT)
		@JsonFormat(pattern = CoreConstants.DATETIME_FORMAT_DEFAULT, timezone = CoreConstants.DATE_TIMEZONE_DEFAULT)
		private Date lastdate;

		public Long getId() {
			return id;
		}

		@Override
		public Serializable getPrimaryKey() {
			return id;
		}

		@Override
		public Serializable getText() {
			return name;
		}

		public void setId(Long id) {
			this.id = id;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getCode() {
			return code;
		}

		public void setCode(String code) {
			this.code = code;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}

		public int getTaxis() {
			return taxis;
		}

		public void setTaxis(int taxis) {
			this.taxis = taxis;
		}

		public boolean getValid() {
			return valid;
		}

		public void setValid(boolean valid) {
			this.valid = valid;
		}

		public boolean getAllowQueryInvalid() {
			return allowQueryInvalid;
		}

		public void setAllowQueryInvalid(boolean allowQueryInvalid) {
			this.allowQueryInvalid = allowQueryInvalid;
		}

		public boolean getCompellingDelete() {
			return compellingDelete;
		}

		public void setCompellingDelete(boolean compellingDelete) {
			this.compellingDelete = compellingDelete;
		}

		public String getParentIsNull() {
			return parentIsNull;
		}

		public void setParentIsNull(String parentIsNull) {
			this.parentIsNull = parentIsNull;
		}

		public String getValidString() {
			return validString;
		}

		public void setValidString(String validString) {
			this.validString = validString;
		}

		public Date getCreatedate() {
			return createdate;
		}

		public void setCreatedate(Date createdate) {
			this.createdate = createdate;
		}

		public Date getLastdate() {
			return lastdate;
		}

		public void setLastdate(Date lastdate) {
			this.lastdate = lastdate;
		}
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNsrsbh() {
		return nsrsbh;
	}

	public void setNsrsbh(String nsrsbh) {
		this.nsrsbh = nsrsbh;
	}

	public String getSpbm() {
		return spbm;
	}

	public void setSpbm(String spbm) {
		this.spbm = spbm;
	}

	public String getSpmc() {
		return spmc;
	}

	public void setSpmc(String spmc) {
		this.spmc = spmc;
	}

	public String getSpsm() {
		return spsm;
	}

	public void setSpsm(String spsm) {
		this.spsm = spsm;
	}

	public String getYhzcbs() {
		return yhzcbs;
	}

	public void setYhzcbs(String yhzcbs) {
		this.yhzcbs = yhzcbs;
	}

	public String getLslbs() {
		return lslbs;
	}

	public void setLslbs(String lslbs) {
		this.lslbs = lslbs;
	}

	public String getZzstsgl() {
		return zzstsgl;
	}

	public void setZzstsgl(String zzstsgl) {
		this.zzstsgl = zzstsgl;
	}

	public String getDw() {
		return dw;
	}

	public void setDw(String dw) {
		this.dw = dw;
	}

	public String getGgxh() {
		return ggxh;
	}

	public void setGgxh(String ggxh) {
		this.ggxh = ggxh;
	}

	public Date getCreatedate() {
		return createdate;
	}

	public void setCreatedate(Date createdate) {
		this.createdate = createdate;
	}

	public Date getLastdate() {
		return lastdate;
	}

	public void setLastdate(Date lastdate) {
		this.lastdate = lastdate;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Double getDj() {
		return dj;
	}

	public void setDj(Double dj) {
		this.dj = dj;
	}

	public slKindVo getSlKind() {
		return slKind;
	}

	public void setSlKind(slKindVo slKind) {
		this.slKind = slKind;
	}

	@Override
	public Serializable getPrimaryKey() {
		// TODO Auto-generated method stub
		return id;
	}

	@Override
	public Serializable getText() {
		// TODO Auto-generated method stub
		return spmc;
	}

}
